#include <WiFi.h>
#include <WiFiClient.h>
#include <WiFiClientSecure.h>
#include <ArduinoJson.h>
#include <ArduinoHA.h>

class Mqtt
{
public:
    Mqtt(HADevice& device);
    ~Mqtt();
    void setServer(char *server, uint16_t port);
    void setUser(char *name, char *pass);
    boolean connect();
    void loop();
    boolean connected();

private:
    std::string mServerHost;
    std::string mUserName;
    std::string mUserPass;
    uint16_t mServerPort = 1883;
    HAMqtt *mqttClient;
};
